import type { TableFilterOptions } from '@ykst/components';
import type { TableColumnsType } from 'ant-design-vue';

export const columns: TableColumnsType = [
  {
    dataIndex: 'yearMonth',
    title: '形成年月',
    align: 'center',
    ellipsis: true,
  },
  {
    dataIndex: 'pro_name',
    title: '无形资产名称',
    align: 'left',
    ellipsis: true,
  },
  {
    dataIndex: 'use_money',
    title: '形成无形资产摊销额',
    align: 'right',
    ellipsis: true,
  },
  {
    dataIndex: 'duration_month',
    title: '摊销时长(月)',
    align: 'center',
    ellipsis: true,
  },
  {
    dataIndex: 'know_month_money',
    title: '每月无形资产摊销额',
    align: 'right',
    ellipsis: true,
  },
  {
    dataIndex: 'updated_at',
    title: '更新时间',
    align: 'center',
    ellipsis: true,
  },
  {
    dataIndex: 'operator',
    title: '操作人',
    align: 'center',
    ellipsis: true,
  },
  {
    dataIndex: 'action',
    title: '操作',
    align: 'center',
    width: 150,
  },
];
export const filterConfig: TableFilterOptions = {
  pro_name: {
    type: 'search',
    field: 'staff_name',
  },
  updated_at: {
    field: 'updated_at',
    type: 'timeBetween',
    picker: 'month',
    format: 'YYYY-MM',
    valueFormat: 'YYYY-MM-DD HH:mm:ss',
  },
};
